package ru.urfc.portal.model.accounting;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

import ru.urfc.portal.model.SpectrObjectWithContragent;
import ru.urfc.portal.ui.client.Constants;

@Table(name = "portal_contracts")
@Entity
@XmlRootElement(name = Constants.CONTRACT)
public class Contract extends SpectrObjectWithContragent {
	public String number;
	@Temporal(TemporalType.DATE)
	public Date issueDate;
	@Temporal(TemporalType.DATE)
	public Date expireDate;

	public Contract() {
	}
	
	public Contract(Contragent contragent, String number, Date issueDate,
			Date expireDate) {
		super(contragent);
		this.number = number;
		this.issueDate = issueDate;
		this.expireDate = expireDate;
	}

}
